export default {
    state: {
      list:{
        "tableId": 1,
        "workFlowDef": {
            "name": ""
        },
        "directorMaxLevel": 0,
        "flowPermission": [],
        "nodeConfig": {
            "nodeName": "发起人",
            "type": 0,
            "priorityLevel": "",
            "settype": "",
            "selectMode": "",
            "selectRange": "",
            "directorLevel": "",
            "examineMode": "",
            "noHanderAction": "",
            "examineEndDirectorLevel": "",
            "ccSelfSelectFlag": "",
            "conditionList": [],
            "nodeUserList": [],
            "childNode": {
                "nodeName": "审核人",
                "error": false,
                "type": 1,
                "settype": 4,
                "selectMode": 1,
                "selectRange": 1,
                "directorLevel": 3,
                "examineMode": 1,
                "noHanderAction": 2,
                "examineEndDirectorLevel": 0,
                "childNode": null,
                "nodeUserList": []
            },
            "conditionNodes": []
        },
        
    },sxtlpath:'',
      promoterDrawer: false,
        flowPermission: [],
        approverDrawer: false,
        approverConfig:{},
        copyerDrawer: false,
        copyerConfig:{},
        conditionDrawer: false,
        conditionsConfig:{
            conditionNodes: [],
        },
      controlAttr: {},
      activeKey: '',
      tableId: '',
        isTried: false,
        flowPermission1: {},
        approverConfig1: {},
        copyerConfig1: {},
        conditionsConfig1: {
            conditionNodes: [],
        },
    },
    mutations: {
      sxclick(state:any,str:any){
        state.sxtlpath=str
      },
      setControlAttr(state:any, obj:any) {
        state.controlAttr = obj
      },
      setActiveKey(state:any, key:any) {
        state.activeKey = key
      },
      updatePromoter(state:any,promoterDrawer:any){
        console.log(state.promoterDrawer,"promoterDrawer");
        
        state.promoterDrawer = promoterDrawer
        console.log(state.promoterDrawer,"promoterDrawer");
        
    },
    updateFlowPermission(state:any,flowPermission:any){
        console.log(flowPermission);
        state.flowPermission = flowPermission;
    },
    updateApprover(state:any,approverDrawer:any){
        state.approverDrawer = approverDrawer
    },
    setApprover(status:any, payload:any) {
      status.approverDrawer = payload
  },
    setApproverConfig(state:any, payload:any) {
      state.approverConfig = payload
      console.log(state.approverConfig,payload);
      
  },
    // 更新审批者配置(选中初始)
    updateApproverConfig(state:any,approverConfig:any){
        state.approverConfig = approverConfig
    },
    // 更新副本
    updateCopyer(state:any,copyerDrawer:any){
        state.copyerDrawer = copyerDrawer
    },
    updateCopyerConfig(state:any,copyerConfig:any){
        state.copyerConfig = copyerConfig
    },
    updateCopyerC1(state:any,copyerConfig:any){
      state.copyerConfig1 = copyerConfig
  },
    updateCondition(state:any,conditionDrawer:any){
        state.conditionDrawer = conditionDrawer
    },
    updateConditionsConfig(state:any,conditionsConfig:any){
        state.conditionsConfig = conditionsConfig
    },
    },
    actions: {
      // action 与mutations类似, 但是它提交的是mutations
      // 提交方法 $store.dispatch('toggleHello')
      /* toggleHello: ({commit}) => {
         commit('changeHello')
       } */
    }
  }
  